package com.hopu.aop.proxy.proxy;

/**
 * 手机的门店代理商
 */
public class PhoneShop implements IPhoneSell {

    //电脑工厂对象（被代理者）
    private IPhoneSell miComputerFactory;

    //传入被代理者对象
    public PhoneShop(IPhoneSell miComputerFactory){
        this.miComputerFactory = miComputerFactory;
    }

    @Override
    public void sellPhone() {
        //扩展功能
        System.out.println("给手机打广告~~~~~~~~~~~");
        //调用被代理者方法
        miComputerFactory.sellPhone();
        System.out.println("给手机做售后~~~~~~~~~~~");
    }
}
